Add template-apply modal and diamond action on repository panels#313
Merged
tbrandenburg merged 2 commits intomainfrom Mar 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
MADE_HOME/.made/templates/to existing repositories using the same look-and-feel as other repo actions.Modalcomponent and adding a small transparent diamond icon for the action.Description
DiamondIconSVG component used as a top-right action on each repository panel to open the template modal.RepositoriesPagethat lists templates as blue primary buttons and supports close via the existing modal×, shows success or error alerts, and prevents closing while a template is applying.useApi) withlistRepositoryTemplatesandapplyRepositoryTemplatemethods and added aTemplateApplyResponsetype.list_repository_templates()andapply_repository_template(repo_name, template_name)inrepository_service.pywhich list template folders underMADE_HOME/.made/templates/and recursively copy template files into the target repository usingshutil.copytree/shutil.copy2.GET /api/repositories/templatesandPOST /api/repositories/{name}/templates/applywith input validation and mapped errors to appropriate HTTP responses.Testing
python -m pytest packages/pybackend/tests/unit/test_repository_service.pyand all tests passed (17 passed).python -m pytest packages/pybackend/tests/unit/test_repository_service.py packages/pybackend/tests/unit/test_api.pybut collection failed in this environment because thefastapipackage is not installed, causing an import error fortest_api.py.npm --prefix packages/frontend run test -- RepositoriesPage.test.tsxand the Vitest run passed (1 file, 3 tests passed).Codex Task